package StructuralMode.flyweight;

public class Client {
    public static void main(String[] args) {
         FlyweightFactory flyweightFactory = FlyweightFactory.getFlyweightFactory();

         AbstractBox boxL = flyweightFactory.getBox("L");
         boxL.setColor("红色");
         boxL.show();

        AbstractBox boxL2 = flyweightFactory.getBox("L");
        boxL2.setColor("黑色");
        boxL.show();

        System.out.println(boxL == boxL2);


    }
}
